package com.gjsrmyy.edi.mapper;

import com.gjsrmyy.edi.entity.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EdiMapper extends Mapper {
    /**
     * 获取HIS商品目录
     */
    List<String> loadGoodsDirOfDrugs();
    List<String> loadGoodsDirOfConsumables();

    List<String> loadDepartmentDirOfDrugs();
    List<String> loadDepartmentDirOfConsumables();

    List<String> loadSupplierDirOfDrugs();
    List<String> loadSupplierDirOfConsumables();

    List<String> loadStaffDirOfDrugs();
    List<String> loadStaffDirOfConsumables();

    List<String> loadProcurementPlanOfDrugs();
    List<String> loadProcurementPlanOfConsumables();

    List<String> loadRegistrationOfConsumables();
    List<String> loadRegistrationOfDrugs();

    OutGoods queryGoodsInfo(@Param("goodsNo")String goodsNo);
    OutGoods queryOutGoodsOfDrugs(@Param("goodsNo")String goodsNo,@Param("producerNo")String producerNo);

    String produceRoamSuffix();                             // 生成流转单号
    String produceRoamPrefix();                         // 流转单号前缀
    String produceIdentityNo(@Param("tableName") String tableName);         // 生成编号
    String produceIdentityNoOfDrugs(@Param("tableName") String tableName);      // 获取YK主键编号
    String produceIntoNo(@Param("type")String type);            //生成入库单号
    void correctingRoamNo();                          // 流转单校正年月
    int insertProcurement(@Param("BillNo")String billNo,@Param("RoamNo")String roamNo,@Param("CompanyNo")String companyNo,@Param("MakingNo")String makingNo,@Param("CGRY")String CGRY);

    int insertDetailed(@Param("detailedNo") String detailedNo,@Param("billNo") String billNo,@Param("goodsNo") String goodsNo,@Param("manufactor") String manufactor,@Param("batchNo") String batchNo,@Param("purchasePrice") String purchasePrice,@Param("retailPrice") String retailPrice,@Param("num") String num,
                        @Param("unit") String unit,@Param("packing") String packing,@Param("stockNo") String stockNo,@Param("wholesalePrice") String wholesalePrice,@Param("deliveryNo")String deliveryNo);

    int insertWarehousing(@Param("type")String type,@Param("intoNo")String intoNo,@Param("supplierNo")String supplierNo,@Param("staffNo")String staffNo);

    int insertWarehousingDetailed(@Param("recognitionNo")String recognitionNo,@Param("type")String type,@Param("intoNo")String intoNo,
                                  @Param("drugsNo")String drugsNo,@Param("manufactor")String manufactor,@Param("batchNo")String batchNo,
                                  @Param("validity") String validity,@Param("wholesalePrice")String wholesalePrice,@Param("retailPrice")String retailPrice,
                                  @Param("stockNo")String stockNo,@Param("num")String num,@Param("purchasePrice")String purchasePrice,@Param("flag")String flag,@Param("deliveryNo")String deliveryNo);

    String checkFlag(@Param("BillNo")String BillNo);

    String querySupplier(@Param("type")String type,@Param("SupplierName")String SupplierName);
}
